﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CamController : MonoBehaviour
{
	// Start is called before the first frame update
	public Camera cam;
	bool stopZoom = false;
	void Start()
	{
		StartCoroutine(zoomIn());
	}

	// Update is called once per frame
	void Update()
	{

	}

	IEnumerator zoomIn()
	{
		while (!stopZoom)
		{
			cam.fieldOfView -= 15f * Time.deltaTime;
			yield return new WaitForEndOfFrame();
			if (cam.fieldOfView <= 50) stopZoom = true;
		}
	}
}
